
<extend name="Public/layout"/>
<block name="head">
<script src="__PUBLIC__assets/ckplayer/ckplayer.js"></script>
<script src="__PUBLIC__js/circle.js"></script>
<link rel="stylesheet" href="__PUBLIC__css/plat-ranking.css">
</block>
    
   <block name="main">
      <section class="nav">
        <ul class="retrie">
        <li><span><a href="/Home//Financial/index">理财返利</a></span><i></i></li>
            <li class="select"><span><a href="/Home/circle/rank_list">网贷排名</a></span></li>
        </ul>
    </section>

        <div class="header">
            <div class="swiper-container">
                <div class="swiper-wrapper">
          				<foreach name="ad_list" item="v">
                      <div class="swiper-slide"><img src="{$v.content}" alt=""></div>
          					</foreach>
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
        <div class="plat-ranking-tips">
          <div class="palt-randing-tips-left">
            <p>排行榜更新截止日期：{$push_date}</p>
            <p>排名规则：平台排名数据均来自第三方机构，仅供参考。</p>
          </div>
          <div class="palt-randing-tips-right"></div>
        </div>
        <div class="content">
            <div class="title">
                <ul>
                    <li>平台名称</li>
                    <li onclick="order(this,1)" attr="0">网贷之家<span></span></li>
                    <li onclick="order(this,2)" attr="0">网贷天眼<span></span></li>
                    <li onclick="order(this,3)" attr="0">融360<span ></span></li>
                </ul>
            </div>
            <div class="plat-list">
                
                
            
            </div>
        </div>
		<div style="height:1rem;"></div>

</block>
<block name="js"> 
    <script>
      function order(obj,val){
          $('.title').find('li').attr('0');
          $('.title').find('li').find('span').removeClass('paixu-up');
          $('.title').find('li').find('span').removeClass('paixu-down');
          var attr_val = $(obj).attr('attr');
          if(attr_val==0){
            $(obj).find('span').addClass('paixu-up');
            $(obj).attr('attr','1');
            get_data(val,1)
          }else if(attr_val==1){
              $(obj).find('span').removeClass('paixu-up');
              $(obj).find('span').addClass('paixu-down');
              $(obj).attr('attr','0');
              get_data(val,2)
          }
      }
      $('.palt-randing-tips-right').click(function() {
        $('.plat-ranking-tips').hide();
      });
        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            paginationClickable: true,
        });
        $(function(){
          get_data();
        })
        function get_data(val,o_id){
          $.post('/Home/Circle/rank_list',{
            val:val,
            o_id:o_id
          },function(res){
            var h='';
            $(res).each(function(i,v) {
                h+='<ul class="item-list-wrapper">'
                h+='<a href="/Home/Circle/rank_info/id/'+v.id+'">'
                h+='<li><img src="'+v.logo+'">'
                if(v.sys_id > 0){
                  h+='<span class="fanli"></span>'
                }
                
                h+='</li><li>'
                h+='<p>'+v.home_rank+'</p>'
                h+='<p class="item-desc">之家排名</p>'
                h+='</li>'
                h+='<li>'
                h+='<p>'+v.eye_rank+'</p>'
                h+='<p class="item-desc">天眼排名</p>'
                h+='</li>'
                h+='<li>'
                h+='<p>'+v.rong_rank+'</p>'
                h+='<p class="item-desc">融360排名</p>'
                h+='</li>'
                h+='</a>'
                h+='</ul> '
            });
            $('.plat-list').html(h)
            console.log(res)
          })
        }
    </script>
</block>